package com.ruoyi.business.controller;

import com.ruoyi.business.domain.bo.EmoticonTypeBo;
import com.ruoyi.business.domain.vo.EmoticonTypeVo;
import com.ruoyi.business.service.IEmoticonTypeService;
import com.ruoyi.common.core.domain.AjaxResult;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 最爱喝兽奶
 * @create 2022/7/24
 **/
@Api("表情包类型的控制器")
@RestController
@RequestMapping("/business/emoticonType")
public class EmoticonTypeController {

    @Autowired
    private IEmoticonTypeService emoticonTypeService;

    @GetMapping("/list")
    public AjaxResult emoticonTypeList() {
        try {
            List<EmoticonTypeVo> list = emoticonTypeService.list(new EmoticonTypeBo());
            return AjaxResult.success(list);
        } catch (Exception e) {
            return AjaxResult.error();
        }
    }

}
